<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title><?php echo C('SITE_INFO.name');?></title>
<script type="text/javascript" src="__PUBLIC__/scripts/jquery-1.7.2.min.js"></script>
<link href="__PUBLIC__/Catalog/css/common.css" rel="stylesheet" type="text/css" />

<link href="__PUBLIC__/Catalog/css/detailsmm.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div class="main">
   <div class="title">
         <div class="title1">
             <a href="<?php echo U('Products/detail');?>?pid=<?php echo ($pid); ?>" id="back"> < </a>拍卖出价
         </div>
   </div>
   <div class="content">
   	  <form aciton="<?php echo U('Products/auction');?>" method="post" id="auctionform">
   	  <input type="hidden" name="pid" value="<?php echo ($pid); ?>"/>
   	  <div class="des">当前价：
   	  		<?php if($nflag == 1): ?>￥<?php echo ($nowprice["price"]); ?><input type="hidden" name="oldprice" id="oldprice" value="<?php echo ($nowprice["price"]); ?>"/>
			<?php else: ?>￥<?php echo ($nowprice["products_paimai_price"]); ?><input type="hidden" name="oldprice" id="oldprice" value="<?php echo ($nowprice["products_paimai_price"]); ?>"/><?php endif; ?>
   	  </div>
   	  <div class="des">出价：<input type="text" style="border:1px solid #ccc;" name="price" id="price" value=""/>元</div>
   	  <div class="des">1.请超过当前价 2.请一口价购买</div>
   	  <div id="ads">
         	<a href="javascript:$('#buyconfirm').css('display','block');" style="margin-left:20px;"  class="xiadan">一口价￥<?php echo ($nowprice["products_price"]); ?></a>
         	<input type="button" class="xiadan" name="tijiao" id="tijiao" onclick="javascript:checkprice();" value="出价"/>
      </div>
   	  </form>
      
   </div>
</div>
<div class="foot1" style="display:none;" id="buyconfirm">
    <div class="foot2">
        <span class="foot2i">确认提示：</span>
        <a class="foot2x" onclick="javascript:$('#buyconfirm').css('display','none');" ></a>
    </div>
    <div class="foot2Select">
    	<p>建议您先联系卖家确认后再行购买</p>
        <a class="go" id="havenshow" href="<?php echo U('Order/index');?>?pid=<?php echo ($pid); ?>">已确认</a>
        <a class="del" id="noshow"  href="javascript:$('#buyconfirm').css('display','none');">再看看</a>
    </div>
</div>
<script>
$(function(){
    if('<?php echo ($msg); ?>'!='0'){
        alert('<?php echo ($msg); ?>');
    }
});
function checkprice(){
	var oldprice = $('#oldprice').val();
	var nowprice = $('#price').val();
	if(oldprice>=nowprice){
		alert('出价必须超过当前价！');
	}else{
		$('#auctionform').submit();
	}
}
</script>
<div class="index-foot">
    <div class="index-foot2">
            <ul>
              <li>
                  <dl>
                      <dd class="index-dds"><a href="<?php echo U('Index/index');?>"><img src="__PUBLIC__/Catalog/images/house.png" /></a></dd>
                      <dd><a href="<?php echo U('Index/index');?>">首页</a></dd>
                  </dl>
              </li>
              <li>
                  <dl>
                      <dd class="index-dds"><a href="<?php echo U('Products/index');?>"><img src="__PUBLIC__/Catalog/images/cate1.png" /></a></dd>
                      <dd><a href="<?php echo U('Products/index');?>">商品</a></dd>
                  </dl>
              </li>
              <li>
                  <dl>
                      <dd><a href="<?php echo U('Mproducts/publish');?>"><img src="__PUBLIC__/Catalog/images/jia.png"style=" width:50px; height:50px;" /></a></dd>
                  </dl>
              </li>
              <li>
                  <dl>
                      <dd class="index-dds"><a href="<?php echo U('Membership/leaveword');?>"><img src="__PUBLIC__/Catalog/images/<?php if($count > 0): ?>message-hot.png<?php else: ?>message.png<?php endif; ?>" /></a></dd>
                      <dd><a href="<?php echo U('Membership/leaveword');?>">信息</a></dd>
                  </dl>
              </li>
              <li>
                  <dl>
                      <dd class="index-dds"><a href="<?php echo U('Membership/index');?>?uid=<?php echo ($uid); ?>"><img src="__PUBLIC__/Catalog/images/men.png" /></a></dd>
                      <dd><a href="<?php echo U('Membership/index');?>?uid=<?php echo ($uid); ?>">我的</a></dd>
                  </dl>
              </li>
            </ul>       
    </div>
</div>
</body>
</html>